import request from '@/utils/request.js'
import { useTokenStore } from '@/store/token'

export const scienceVarietyListService = ()=>{
    return request.get('/variety/list');
}

export const scienceCategoryListService = (id)=>{
    return request.get('/variety/subList?id='+id)
}

export const scienceListService = (params)=> {
    return request.get('/petScience/listPage',{params});
}

export const addScienceService = (data) => {
    return request.put('/petScience/add',data);
}

export const scienceEditService = (data) => {
    console.log(data);
    
    return request.patch('/petScience/update',data)
}

export const scienceDeleteService = (id) => {
    return request.delete('/petScience/delete?id='+id);
}